package com.hongfeng.web.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hongfeng.web.dao.ContactDao;
import com.hongfeng.web.model.Contact;
import com.hongfeng.web.service.ContactService;

@Service
public class ContactServiceImpl implements ContactService {

	@Resource
	private ContactDao contactDao;

	public Contact find() {
		List<Contact> contacts = this.contactDao.findAll();
		if(contacts.size() > 0) {
			return contacts.get(0);
		}
		return new Contact();
	}

}
